package com.mars.algorithm;

/**
 * @Author King
 * @create 2020/7/2 14:16
 */
public class ThisClassTest {

    private void tmp() {
        System.out.println("I am father");
    }

    static class mark {
        private void gg() {

        }

        private void test() {
            this.gg();
        }
    }


    private static ThreadLocal<String> goal = new ThreadLocal<String>();


    public static void main(String[] args) {

//        for (int i = 0; i < 5; i++) {
//            //           goal.set(i + "");
//            int t = i;
//            new Thread(new Runnable() {
//                @Override
//                public void run() {
//                    goal.set(t + "");
//                    System.out.println(Thread.currentThread().getId() + ":" + goal.get());
//                }
//            }).start();
//            try {
//                Thread.sleep(1000);
//            } catch (InterruptedException e) {
//                e.printStackTrace();
//            }
//        }





        new Thread(new Runnable() {
            @Override
            public void run() {
                ThreadLocal<String> t1 = new ThreadLocal<String>();
                ThreadLocal<String> t2 = new ThreadLocal<String>();

                t1.set("1");
                t1.set("2");
            }
        }).start();


    }
}
